TABLE OF CONTENTS

paletteclass/--background--
paletteclass/Methods
paletteclass/Attributes


top paletteclass/--background--
    NAME

        Class:        paletteclass
        Superclass:   baseclass
        Include File: 

    FUNCTION

        To  provide you with a palette selector gadget simular to the gadtools
        palette gadget. It allows you to select a pen from  a range  of screen
        colors or a range of pens selected by you.

        This class also implements a custom DragNDrop which  allows  the color
        rectangles from the object to be dragged around the screen and dropped
        on objects who are willing to accept data from the dragged object.

        Objects  from  this  class  send  out  the  following  attribute pairs
        in their notification messages:

        GA_ID                - Gadget object ID.
        PALETTE_CurrentColor - The currently selected pen.



top paletteclass/Methods
NEW METHODS

    None.


CHANGED METHODS

    BASE_GETDRAGOBJECT -- This class overrides the  superclass (baseclass)
            to create a BitMap containing only the color that is selected.

            Please  refer  to  the  baseclass   documentation   for   more
            information on this method. And how to override it.

    BASE_FREEDRAGOBJECT -- This method will free the BitMap created by the
            BASE_GETDRAGOBJECT method.

            Please  refer  to  the  baseclass   documentation   for   more
            information on this method. And how to override it.



top paletteclass/Attributes
NOTE

    All baseclass attributes are also valid for this class.


NAME

    PALETTE_Depth -- ( ULONG )

FUNCTION

    To determine the depth of the palette object.   Currently this is  the
    only way to determine the amount of colors in the palette object. This
    will always be a  power  of  2 (I.E. 2, 4, 8, 16, 32, 64, 128 or 256).
    Allowable values here are 1 for two colors through 8 for 256 colors.

    Default is 1 (two colors). Applicability is (I).


NAME

    PALETTE_ColorOffset -- ( ULONG )

FUNCTION

    To specify the first color which is used in  the palette.  Please note
    that you must specify an ordinal number here, not a pen number.   This
    value  must  range  between  0  and  256  minus  the  amount of colors
    displayed in the palette object.

    Default is 0. Applicability is (I).


NAME

    PALETTE_PenTable -- ( UWORD * )

FUNCTION

    To optionally specify an array with pen numbers so that you  can build
    a palette object with the colors you want. Please note that  the array
    must contain at least PALETTE_ColorOffset + ( 1 << PALETTE_Depth ) pen
    entries. This is because the PALETTE_ColorOffset attribute  determines
    at which offset in the array the class will get it's pens.

    Default is NULL. Applicability is (I).

SEE ALSO

    PALETTE_ColorOffset


NAME

    PALETTE_CurrentColor -- ( ULONG )

FUNCTION

    To determine the currently selected pen in the palette object.  Please
    note that this number is a  pen  number,  not  an ordinal color number
    within the palette object itself.

    Default  is  the  first  color in the palette object. Applicability is
    (ISGNU).


NAME

    BT_DragObject -- ( BOOL )

FUNCTION

    To enable drag and drop operations with the color  rectangles  in  the
    palette object.

    Default is FALSE. Applicability is (IS).